package com.ruitu.mall_98_seller.base;

import com.ruitu.arad.AradApplication;
import com.ruitu.arad.AradApplicationConfig;

import cn.jpush.android.api.JPushInterface;
import io.rong.imkit.RongIM;
import me.jessyan.progressmanager.ProgressManager;
import okhttp3.OkHttpClient;

public class MyApp extends AradApplication {
    @Override
    protected AradApplicationConfig appConfig() {
        return new AradApplicationConfig();
    }

    //这里我就不写管理类了,捡个懒,直接在 Application 中管理单例 Okhttp
    private static OkHttpClient mOkHttpClient;

    @Override
    public void onCreate() {
        super.onCreate();

        JPushInterface.setDebugMode(true);
        JPushInterface.init(this);

        RongIM.init(this);

        this.mOkHttpClient = ProgressManager.getInstance()
                .with(new OkHttpClient.Builder())
                .build();
    }


    public static OkHttpClient getOkHttpClient() {
        return mOkHttpClient;
    }
}
